package com.lovo.stock.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.stock.bean.ContentBean;
import com.lovo.stock.mapper.ContentMapper;
import com.lovo.stock.service.IContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, ContentBean> implements IContentService {
    @Autowired
    ContentMapper contentMapper;

    @Override
    public List<ContentBean> queryContentByType(int type) {
        QueryWrapper q=new QueryWrapper<>();
        q.eq("type",type);
        return contentMapper.selectList(q);
    }
}
